import Sequelize from 'sequelize'
import sequelize from './../../database'

const IpAuth = sequelize.define('ip_auth',{
    id:{
        type: Sequelize.UUIDV4,
        defaultValue: Sequelize.UUIDV4,
        field: 'ID',
        unique: true,
        allowNull: false,
        primaryKey:true
    },
    ip:{
        type: Sequelize.STRING(30),
        unique: true,
        allowNull: false,
    },
    status: {
        type: Sequelize.INTEGER,
        allowNull:false
    },
    priority: {
        type: Sequelize.INTEGER,
        allowNull: false
    },
    time_limit: {
        type: Sequelize.INTEGER,
        allowNull: false,
        defaultValue: 0
    },
    creator: {
        type: Sequelize.STRING
    },
    memo: {
        type: Sequelize.STRING
    }
},{
    tableName: 'ip_auth'
});

class IpInterceptorModel{

}

module.exports = new IpInterceptorModel();